package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.RoleService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseRoleClient;
import com.wicket.okrframework.integration.dto.QueryRoleListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleListReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.QueryRoleDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrframework.integration.dto.AddRoleRespDto;
import com.wicket.okrframework.integration.dto.AddRoleReqDto;
import com.wicket.okrframework.integration.dto.UpdateRoleRespDto;
import com.wicket.okrframework.integration.dto.UpdateRoleReqDto;
import com.wicket.okrframework.integration.dto.ArchiveRoleRespDto;
import com.wicket.okrframework.integration.dto.ArchiveRoleReqDto;
import com.wicket.okrframework.integration.FwBaseMemberClient;
import com.wicket.okrframework.integration.dto.QueryRoleRelListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleRelListReqDto;
import com.wicket.okrframework.integration.FwBaseDivineDataClient;
import com.wicket.okrframework.integration.dto.BatchClearUserInfoFromRedisRespDto;
import com.wicket.okrframework.integration.dto.BatchClearUserInfoFromRedisReqDto;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrframework.integration.FwBaseAppSceneClient;
import com.wicket.okrframework.integration.dto.BatchQueryBizSceneRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryBizSceneReqDto;
import com.wicket.okrframework.integration.dto.QueryHostTypeCollectionRemoveExistingDataListRespDto;
import com.wicket.okrframework.integration.dto.QueryHostTypeCollectionRemoveExistingDataListReqDto;
import com.wicket.okrframework.integration.dto.QueryRoleRecommendListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleRecommendListReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffRoleRecommendDto;
import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrframework.integration.dto.QueryRoleRecommendBizSceneListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleRecommendBizSceneListReqDto;
import com.wicket.okrframework.integration.dto.QueryRoleNoRecommendBizSceneListRespDto;
import com.wicket.okrframework.integration.dto.QueryRoleNoRecommendBizSceneListReqDto;
import com.wicket.okrframework.integration.dto.BizSceneDto;
import com.wicket.okrpbff.biz.service.dto.common.BffRoleNoRecommendBizSceneDto;
import com.wicket.okrframework.integration.dto.AddRoleRecommendBizSceneRespDto;
import com.wicket.okrframework.integration.dto.AddRoleRecommendBizSceneReqDto;
import com.wicket.okrframework.integration.dto.DeleteRoleRecommendBizSceneRespDto;
import com.wicket.okrframework.integration.dto.DeleteRoleRecommendBizSceneReqDto;
import com.wicket.okrframework.integration.dto.ArchiveRoleRecommendBizSceneRespDto;
import com.wicket.okrframework.integration.dto.ArchiveRoleRecommendBizSceneReqDto;
import com.wicket.okrframework.integration.dto.ReleaseRoleRecommendBizSceneRespDto;
import com.wicket.okrframework.integration.dto.ReleaseRoleRecommendBizSceneReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Role", tags = {"Role"})
@RestController
// @RequestMapping("/poms/role/")
public class RoleController {
    @Autowired
    RoleService roleService;

    /**
   * B1-2查询角色列表（平台）
   * gen by moon at 8/15/2022, 10:27:37 PM
   */
    @PostMapping("/oms/platform/role/queryRoleList")
    @ApiOperation(value = "B1-2查询角色列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryRoleListRespDto> queryRoleList(@RequestBody(required=false) @Validated BffQueryRoleListReqDto reqDTO){
        return OkrResult.success(roleService.queryRoleList(reqDTO));
    }

    /**
   * B1-2存档角色（平台）
   * gen by moon at 8/10/2022, 3:43:40 AM
   */
    @PostMapping("/oms/platform/role/archiveRole")
    @ApiOperation(value = "B1-2存档角色（平台）", response = OkrResult.class)
    public OkrResult<BffArchiveRoleRespDto> archiveRole(@RequestBody(required=false) @Validated BffArchiveRoleReqDto reqDTO){
        return OkrResult.success(roleService.archiveRole(reqDTO));
    }

    /**
   * B1-2修改角色（平台）
   * gen by moon at 8/10/2022, 3:40:23 AM
   */
    @PostMapping("/oms/platform/role/updateRole")
    @ApiOperation(value = "B1-2修改角色（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateRoleRespDto> updateRole(@RequestBody(required=false) @Validated BffUpdateRoleReqDto reqDTO){
        return OkrResult.success(roleService.updateRole(reqDTO));
    }

    /**
   * B1-2新增角色（平台）
   * gen by moon at 8/17/2022, 8:03:50 PM
   */
    @PostMapping("/oms/platform/role/addRole")
    @ApiOperation(value = "B1-2新增角色（平台）", response = OkrResult.class)
    public OkrResult<BffAddRoleRespDto> addRole(@RequestBody(required=false) @Validated BffAddRoleReqDto reqDTO){
        return OkrResult.success(roleService.addRole(reqDTO));
    }

    /**
   * B1-2查询角色详情（平台）
   * gen by moon at 8/19/2022, 1:29:00 PM
   */
    @PostMapping("/oms/platform/role/queryRoleDetail")
    @ApiOperation(value = "B1-2查询角色详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryRoleDetailRespDto> queryRoleDetail(@RequestBody(required=false) @Validated BffQueryRoleDetailReqDto reqDTO){
        return OkrResult.success(roleService.queryRoleDetail(reqDTO));
    }
/**
   * B1-2查询角色推荐列表(管理)
   * gen by moon at 11/3/2022, 12:40:28 PM
   */
    @PostMapping("/oms/platform/mgt/role/queryRoleRecommendList")
    @ApiOperation(value = "B1-2查询角色推荐列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryRoleRecommendListRespDto> queryRoleRecommendList(@RequestBody(required=false) @Validated BffQueryRoleRecommendListReqDto reqDTO){
        return OkrResult.success(roleService.queryRoleRecommendList(reqDTO));
    }
/**
   * B1-2查询角色推荐到业务场景列表(管理)
   * gen by moon at 10/28/2022, 8:54:35 PM
   */
    @PostMapping("/oms/platform/mgt/role/queryRoleRecommendBizSceneList")
    @ApiOperation(value = "B1-2查询角色推荐到业务场景列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryRoleRecommendBizSceneListRespDto> queryRoleRecommendBizSceneList(@RequestBody(required=false) @Validated BffQueryRoleRecommendBizSceneListReqDto reqDTO){
        return OkrResult.success(roleService.queryRoleRecommendBizSceneList(reqDTO));
    }
/**
   * B1-2查询角色未推荐业务场景列表(管理)
   * gen by moon at 10/28/2022, 8:54:39 PM
   */
    @PostMapping("/oms/platform/mgt/role/queryRoleNoRecommendBizSceneList")
    @ApiOperation(value = "B1-2查询角色未推荐业务场景列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryRoleNoRecommendBizSceneListRespDto> queryRoleNoRecommendBizSceneList(@RequestBody(required=false) @Validated BffQueryRoleNoRecommendBizSceneListReqDto reqDTO){
        return OkrResult.success(roleService.queryRoleNoRecommendBizSceneList(reqDTO));
    }
/**
   * B1-2新增角色推荐到业务场景(管理)
   * gen by moon at 10/28/2022, 8:54:41 PM
   */
    @PostMapping("/oms/platform/mgt/role/addRoleRecommendBizScene")
    @ApiOperation(value = "B1-2新增角色推荐到业务场景(管理)", response = OkrResult.class)
    public OkrResult<BffAddRoleRecommendBizSceneRespDto> addRoleRecommendBizScene(@RequestBody(required=false) @Validated BffAddRoleRecommendBizSceneReqDto reqDTO){
        return OkrResult.success(roleService.addRoleRecommendBizScene(reqDTO));
    }
/**
   * B1-2删除角色推荐到业务场景(管理)
   * gen by moon at 10/28/2022, 8:54:44 PM
   */
    @PostMapping("/oms/platform/mgt/role/deleteRoleRecommendBizScene")
    @ApiOperation(value = "B1-2删除角色推荐到业务场景(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteRoleRecommendBizSceneRespDto> deleteRoleRecommendBizScene(@RequestBody(required=false) @Validated BffDeleteRoleRecommendBizSceneReqDto reqDTO){
        return OkrResult.success(roleService.deleteRoleRecommendBizScene(reqDTO));
    }
/**
   * B1-2存档角色推荐到业务场景(管理)
   * gen by moon at 10/28/2022, 8:54:46 PM
   */
    @PostMapping("/oms/platform/mgt/role/archiveRoleRecommendBizScene")
    @ApiOperation(value = "B1-2存档角色推荐到业务场景(管理)", response = OkrResult.class)
    public OkrResult<BffArchiveRoleRecommendBizSceneRespDto> archiveRoleRecommendBizScene(@RequestBody(required=false) @Validated BffArchiveRoleRecommendBizSceneReqDto reqDTO){
        return OkrResult.success(roleService.archiveRoleRecommendBizScene(reqDTO));
    }
/**
   * B1-2发布角色推荐到业务场景(管理)
   * gen by moon at 10/28/2022, 8:54:49 PM
   */
    @PostMapping("/oms/platform/mgt/role/releaseRoleRecommendBizScene")
    @ApiOperation(value = "B1-2发布角色推荐到业务场景(管理)", response = OkrResult.class)
    public OkrResult<BffReleaseRoleRecommendBizSceneRespDto> releaseRoleRecommendBizScene(@RequestBody(required=false) @Validated BffReleaseRoleRecommendBizSceneReqDto reqDTO){
        return OkrResult.success(roleService.releaseRoleRecommendBizScene(reqDTO));
    }

}

